$(document).ready(function() {	

	$("#btn_pie").click(function () { 
      $("#pie_form").slideToggle(); 
      $("#bar_form").hide(); 
      $("#location_form").hide(); 
      $(this).addClass("active_question");
      $("#btn_bar").removeClass("active_question");
      $("#btn_location").removeClass("active_question");
    });

    $("#btn_bar").click(function () { 
      $("#bar_form").slideToggle(); 
      $("#pie_form").hide(); 
      $("#location_form").hide(); 
      $(this).addClass("active_question");
      $("#btn_pie").removeClass("active_question");
      $("#btn_location").removeClass("active_question");
    });

    $("#btn_location").click(function () { 
      $("#location_form").slideToggle(); 
      $("#pie_form").hide(); 
      $("#bar_form").hide(); 
      $(this).addClass("active_question");
      $("#btn_pie").removeClass("active_question");
      $("#btn_bar").removeClass("active_question");
    });

    var questnum = 4;

    $("#add_question").click(function () { 
    	$('#question_list').append("<span>Answer " + questnum +  ":</span><input type='text' name='question' class='span6'>");
      questnum ++;
    });

});